package com.cskaoyan.controller.wx.lxc;

import com.cskaoyan.bean.common.BasePageInfo;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.common.CommonData;
import com.cskaoyan.bean.po.MarketBrand;
import com.cskaoyan.service.wx.lxc.WxBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("wx/brand")
public class WxBrandController {

    @Autowired
    WxBrandService wxBrandService;

    @RequestMapping("list")
    public BaseRespVo queryBrandList(BasePageInfo basePageInfo){
        CommonData<MarketBrand> commonData = wxBrandService.queryBrandList(basePageInfo);
        return BaseRespVo.succeed(commonData);
    }

    @RequestMapping("detail")
    public BaseRespVo detailBrand(MarketBrand marketBrand){
        MarketBrand marketBrand1 = wxBrandService.detailBrand(marketBrand.getId());
        return BaseRespVo.succeed(marketBrand1);
    }
}
